<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="/css/editthings.css" />
	<script src="/js/admin/jquery/jquery-1.6.1.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="/js/ckeditor/ckeditor.js" language="javascript" ></script>
	<link rel="stylesheet" type="text/css" href="/js/admin/jquery/ui/themes/ui-lightness/jquery.ui.all.css" />
	<script src="/js/admin/jquery/ui/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/ui/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/tabs.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/superfish/js/superfish.js" type="text/javascript"></script>
</head>
<body>
	<?php if($this->error == 1){?>
	<script type="text/javascript">
		window.parent.$.prettyPhoto.close();
		window.top.location.reload();
		window.parent.$.prettyPhoto.close();
	</script>
	<?php } else {?>
	<form method="post" action="/admin/page/edit?action=edit&page=<?php echo $this->page; ?>" name="form_edit_page" id="form_edit_page">
		<div class="content_btn" style="float: right">
			<div class="submit">
				<input type="submit" value="Save" name="submit" class="edit_submit"/>
			</div>
		</div>
		<div><p>Edit page</p></div>
		<div style="clear: both;"></div>
		<div class="line"></div>
		<?php if($this->error == -1){?><h4 style="color:red">There are errors in the editing process </h4><?php }?>
		<?php if($this->error == 7){?><h4 style="color:red">Please sign in to use this function!</h4><?php }?>					
		<div class="content_row">
			<div class="content_row_l">
				<p>Page`s title : <input type="text" value="<?php echo $this->title;?>" size="30" maxlength="30" name="title" id="title" class="content_input"/></p>
				<?php if($this->error == 2){?><h4 style="color:red;margin-top: -15px;height: 10px;">Page`s title > 5 characters</h4><?php }?>
			</div>
		</div>
		<div style="clear:both;"></div>
		<div class="content_row">
			<div class="content_row_l"><p>Code  :</p></div>
			<?php if($this->error == 3){?><h4 style="color:red;margin-top: -15px;height: 10px;">Code already exists</h4><?php }?>
			<?php if($this->error == 4){?><h4 style="color:red;margin-top: -15px;height: 10px;">Code must be> 5 characters</h4><?php }?>
			<div class="content_row_r">
				<input name="code" value = "<?php echo $this->code;?>" />
			</div>
		</div>
	</form>
	<?php }?>
</body>		
</html>		